package com.demo.seckill.queue.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @author libo
 * @ClassName RedisSender
 * @Description: redis生产消息
 * @date 2018/11/30 14:09
 */
@Service
public class RedisSender {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    public void sendChannelMessage(String channel,String message){
        stringRedisTemplate.convertAndSend(channel,message);
    }
}
